const express = require('express')
// 创建路由对象
const router = express.Router()

const {getAll,getinfoById,getAll2,addMovie,updateById,delMovie} = require('../router_handler/movieinfo')

router.get('/movieinfo',getAll)
router.get('/movieinfo/:id',getinfoById)
router.get('/movieAll',getAll2)
router.post('/movieAdd',addMovie)
router.put('/movieinfo',updateById)
router.delete('/movieinfo/:id',delMovie)

// 将路由对象共享出去
module.exports = router